package com.dj.product.k2faas.service.function;

import com.dj.product.k2faas.dto.function.*;
import jakarta.validation.Valid;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

/**
 * Created by 丁建 on 2025/9/23 16:36
 *
 * @author 丁建
 */
public interface FunctionService {
    long add(CreateFunctionRequest function);

    void edit(UpdateFunctionRequest function);

    FunctionResponse findById(long id);

    Page<FunctionResponse> findAll(String keyword, Pageable pageable);

    TestFunctionResponse testFunction(@Valid TestFunctionRequest request);

    void disable(long id);

    void start(long id);

    void stop(long id);
}
